home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 September / CHIP NET Rehberi Eylül 1998.iso / ftp / iftp21 / EXAMPLES.ZIP / EXAM15.FTP < prev    next >
Text File  |  1997-12-16  |  1KB  |  44 lines

  1. //
  2. // Example of Structured If Begin Block
  3. //
  4.  
  5.   ErrorQuiet %1
  6.   Errorlevel 0
  7.   if not session then open website
  8.   if success then begin
  9.      Log Successful login!  Checking for email...
  10.      cd /
  11.      if success then begin
  12.         get sxm105.zip import\
  13.         if success then begin
  14.            Log Successful file download!  Checking for fido...
  15.            cd /asd
  16.            if success then begin
  17.               get sx5chin.*  import\
  18.               if success then begin
  19.                  Log Successful file download!
  20.                  ErrorLevel 0
  21.               else
  22.                  if ErrorQuiet then WriteError
  23.                  Errorlevel 5
  24.               endif
  25.            else
  26.               if ErrorQuiet then WriteError
  27.               Errorlevel 4
  28.            endif
  29.         else
  30.            if ErrorQuiet then WriteError "sxm105.zip"
  31.            cd ftp:
  32.            ErrorLevel 3
  33.         endif
  34.      else
  35.         if ErrorQuiet then WriteError
  36.         ErrorLevel 2
  37.      endif
  38.   else
  39.      if ErrorQuiet then WriteError
  40.      Errorlevel 1
  41.   endif
  42.   Log Done! ErrorLevel = %ErrorLevel%
  43.   Exit
  44.